﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using AutoMapper;
using Microhard.Core.DBUtility;
using Microhard.WarehouseInsp.Buz.Models;
using Microhard.WarehouseInsp.Buz.DataAccess;
using Microhard.WarehouseInsp.Buz.JHWorkflow;


namespace Microhard.WarehouseInsp.Buz.DTO
{
    public class EntityModelMappingBuilder : IDTOBuilder
    {
        public void MappingBuild()
        {
            #region SupProject
            Mapper.CreateMap<SupProjectModel, SupProject>();
            Mapper.CreateMap<SupProject, SupProjectModel>();
            #endregion

            #region SupervisionDetail
            Mapper.CreateMap<SupervisionDetailModel, SupervisionDetail>();
            Mapper.CreateMap<SupervisionDetail, SupervisionDetailModel>();
            #endregion

            #region Customer
            Mapper.CreateMap<CustomerModel, JHBJ_Crm_Customer>();
            Mapper.CreateMap<JHBJ_Crm_Customer, CustomerModel>();
            #endregion

            #region PledgePlanInRecords
            Mapper.CreateMap<PledgePlanInRecordsModel, PledgePlanInRecord>();
            Mapper.CreateMap<PledgePlanInRecord, PledgePlanInRecordsModel>();
            #endregion

            #region ProductList
            Mapper.CreateMap<ProductListModel, ProductList>();
            Mapper.CreateMap<ProductList, ProductListModel>();
            #endregion

            #region Warehouse
            Mapper.CreateMap<WarehouseModel, Warehouse>();
            Mapper.CreateMap<Warehouse, WarehouseModel>();
            #endregion

            #region Attachment
            Mapper.CreateMap<AttachmentModel, Attachment>();
            Mapper.CreateMap<Attachment, AttachmentModel>();
            #endregion

            #region WarehourseTransition
            Mapper.CreateMap<WarehouseTransitionModel, WarehourseTransition>();
            Mapper.CreateMap<WarehourseTransition, WarehouseTransitionModel>();
            #endregion

            #region  InspectionRecord
            Mapper.CreateMap<InspectionRecordModel, InspectionRecord>();
            Mapper.CreateMap<InspectionRecord, InspectionRecordModel>();
            #endregion

            #region  RiskRecords
            Mapper.CreateMap<RiskRecordsModel, RiskRecord>();
            Mapper.CreateMap<RiskRecord, RiskRecordsModel>();
            #endregion

            #region  ApproveRecords
            Mapper.CreateMap<ApproveRecordModel, ApproveRecord>();
            Mapper.CreateMap<ApproveRecord, ApproveRecordModel>();
            #endregion

            #region PledgeChangeRecordModel
              Mapper.CreateMap<PledgeChangeRecord,PledgeChangeRecordModel>();
              Mapper.CreateMap<PledgeChangeRecordModel, PledgeChangeRecord>();
            #endregion
            //MODEL 和 EF实体要加上影射
            #region OutInPutWarehouseRecord
             Mapper.CreateMap<OutIntPutWarehouseModel, OutInPutWarehouseRecord>();
             Mapper.CreateMap<OutInPutWarehouseRecord,OutIntPutWarehouseModel>();
            #endregion

             Mapper.CreateMap<OutInPutApply, OutInPutApplyModel>();
             Mapper.CreateMap<OutInPutApplyModel,OutInPutApply>();
        }
    }
}
